{% extends "base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block head_title %}{% if article %}{% trans "Édition de l’article" %}{% else %}{% trans "Nouvel article" %}{% endif %}{% endblock %}

{% block bootstrap3_extra_head %}
{{ form.media.css }}
{% endblock %}
{% block body_end %}
{{ form.media.js }}
{% endblock %}

{% block content %}
    <h1>{% if article %}{% trans "Édition de l’article" %}{% else %}{% trans "Nouvel article" %}{% endif %}</h1>


    <form method="POST" action="" class="form-horizontal" novalidate>
        {% csrf_token %}
        {% bootstrap_form form layout='horizontal' size='small' %}

        {% buttons %}
            <button type="submit" class="btn btn-primary pull-right">{% trans "Enregistrer" %}</button>
            <a class="btn btn-default" href="{% url 'home' %}">{% trans "Annuler" %}</a>
        {% endbuttons %}
    </form>
{% endblock %}
